<!doctype html>
<html lang="en">
<head>
    <title>Code coverage report for src/assets/octopus/main.js</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="..\..\..\prettify.css" />
    <link rel="stylesheet" href="..\..\..\base.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type='text/css'>
        .coverage-summary .sorter {
            background-image: url(..\..\..\sort-arrow-sprite.png);
        }
    </style>
</head>
<body>
<div class='wrapper'>
  <div class='pad1'>
    <h1>
      <a href="..\..\..\index.html">All files</a> / <a href="index.html">src/assets/octopus</a> main.js
    </h1>
    <div class='clearfix'>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Statements</span>
        <span class='fraction'>0/23</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">100% </span>
        <span class="quiet">Branches</span>
        <span class='fraction'>0/0</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Functions</span>
        <span class='fraction'>0/2</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Lines</span>
        <span class='fraction'>0/23</span>
      </div>
    </div>
  </div>
  <div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// 导入八爪鱼前端各组件引擎
<span class="cstat-no" title="statement not covered" >import {oTemplateEngine} from '../octopus/engine/template'</span>
<span class="cstat-no" title="statement not covered" >import {oTipsEngine} from "./engine/tips";</span>
<span class="cstat-no" title="statement not covered" >import {oRequestEngine} from "./engine/request";</span>
<span class="cstat-no" title="statement not covered" >import {oMethodsEngine} from "./engine/methods";</span>
<span class="cstat-no" title="statement not covered" >import {oToolsEngine} from "./engine/tools";</span>
<span class="cstat-no" title="statement not covered" >import {oRouterEngine} from "./engine/router";</span>
<span class="cstat-no" title="statement not covered" >import {oRenderEngine} from "./engine/render";</span>
<span class="cstat-no" title="statement not covered" >import {oControlEngine} from "./engine/control"</span>
&nbsp;
// 此为八爪鱼前端框架，配套后台八爪鱼API框架可实现高度自动化开发环境。
function <span class="fstat-no" title="function not covered" >oEngine(vue) {</span>
<span class="cstat-no" title="statement not covered" >  this.vue = vue;</span>
<span class="cstat-no" title="statement not covered" >  this.config = {};// 配置数据</span>
&nbsp;
  //护照数据，贯穿全站，在oRequestEngine的init方法中会从Localstorage中获取。
<span class="cstat-no" title="statement not covered" >  this.passport = {</span>
    id: -1,
    name: "",
    realName: "",
    password: "",
    encryption: false,
    appKey: "",// 获取appKey，全站申明周期使用的唯一key
    token: "",// 令牌，判断当前用户是否有资格请求资源。
    // 页面权限可以做在菜单里面，对于vue而言，如果没有权限，则路由都不会生成，所以对于前端而言根本不存在这个页面，故也不存在盗取资源
    // 接口和数据权限，可以通过url绑定接口地址或八爪鱼Source ID的方式来实现，在创建菜单url的时候复选用到的接口地址或八爪鱼Source ID
    // 针对自定义接口，可以自定义数据权限，针对八爪鱼，有配套的八爪鱼数据权限（规定八爪鱼传入的参数的范围即可）这样即可实现接口级别的权限验证。
    remember: false,
    // 样式默认default
    theme: [{
      name: "default",
      offset: {menu: 90, content: 135, list: 200},
      use: true
    }, {
      name: "skyblue",
      offset: {menu: 100, content: 150, list: 200},
      use: false
    }],
    // 权限数据
    authorization: {
      data: "",     // "51_1","2_1","131_1"
      company: null,
      project: "",  // 1,2,3
      building: "", // 1,2,3
    },
    language: "CN",        // 默认值，如果客户机cookie有值则使用客户机配置、登陆以后更新为登陆帐户的主题。
    system: null, // 当前打开的系统
    project:null, // 当前操作的项目
    menu: [],//记录菜单打开关闭状态。
    tab: [{id: -1, url: "/admin/dashboard", name: ""}],//记录tab页打开状态，下次登录还是打开上次的页面。
    tabCurrentName:"M_0",
    lock: false
  };
&nbsp;
  // 加载各种引擎
<span class="cstat-no" title="statement not covered" >  this.note = "VUE APP Framework";</span>
  // 执行路由引擎注册
<span class="cstat-no" title="statement not covered" >  this.router = new oRouterEngine(this);</span>
  // 执行请求渲染引擎，因为从后面开始都需要用到请求，唯一不足的是create生命周期内只有tips以后的引擎才能使用tips。
<span class="cstat-no" title="statement not covered" >  this.tools = new oToolsEngine(this);</span>
  // 执行数据请求模块（最核心）
<span class="cstat-no" title="statement not covered" >  this.request = new oRequestEngine(this);</span>
  // 执行提示渲染引擎
<span class="cstat-no" title="statement not covered" >  this.tips = new oTipsEngine(this);</span>
  // 执行方法事件引擎
<span class="cstat-no" title="statement not covered" >  this.methods = new oMethodsEngine(this);</span>
  // 初始化组件渲染引擎
<span class="cstat-no" title="statement not covered" >  this.control = new oControlEngine(this);</span>
  // 初始化模版渲染引擎
<span class="cstat-no" title="statement not covered" >  this.template = new oTemplateEngine(this);</span>
  // 初始化渲染引擎，渲染模板、组件、控件
<span class="cstat-no" title="statement not covered" >  this.render = new oRenderEngine(this);</span>
&nbsp;
  // 初始化渲染引擎，渲染上述数据
<span class="cstat-no" title="statement not covered" >  this.init();</span>
}
&nbsp;
oEngine.prototype = {
  init: <span class="fstat-no" title="function not covered" >function () </span>{
    // 初始化路由
<span class="cstat-no" title="statement not covered" >    this.router.init();</span>
    // this.tips.debug("[Octopus] Engine Start, Page: " + this.router.get().path);
<span class="cstat-no" title="statement not covered" >    this.tips.debug("Octopus Engine Start, Page: " + this.router.get().path + ".");</span>
  }
}
&nbsp;
// VUE外挂JS库注册，很关键
export {
  oEngine
}
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
  Code coverage
  generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Mon Jan 20 2020 17:54:15 GMT+0800 (GMT+08:00)
</div>
</div>
<script src="..\..\..\prettify.js"></script>
<script>
window.onload = function () {
        if (typeof prettyPrint === 'function') {
            prettyPrint();
        }
};
</script>
<script src="..\..\..\sorter.js"></script>
</body>
</html>
